package com.coffee.order.service.sku.dao;

import com.coffee.order.api.sku.query.PayOrderQuery;
import com.coffee.order.service.sku.bean.PayOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PayOrderDao {
    public PayOrder findById(Integer id);

    public PayOrder findByIdForUpdate(Integer id);

    public PayOrder findByMerchantIdAndOutOrderId(@Param("merchantId") Integer merchantId, @Param("outOrderId") String outOrderId);

    public List<PayOrder> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") PayOrderQuery param);

    public List<PayOrder> page(@Param("param") PayOrderQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public PayOrder findFirst(@Param("param") PayOrderQuery param);

    public Integer insert(PayOrder param);

    Integer insertBatch(List<PayOrder> list);

    public void updateById(@Param("param") PayOrder param);

    public Integer deleteById(Integer id);

    public Integer deleteByIds(List<Integer> idList);

}